/**
 * Copyright (c) 快宝网络 kuaidihelp.com Co., Ltd. All Rights Reserved 禁止外泄以及用于其它的商业用途
 */

import request from "../utils/request";

// 获取定制公众号列表
export async function getWxList(params) {
  return request("/Api/Handle/run", {
    method: "POST",
    body: {
      data: JSON.stringify({
        data: params,
        run: "/Delivery/getWxList",
        time: new Date().getTime()
      })
    }
  });
}

// 轮询检查扫描结果
export async function checkScan(params) {
  return request("/Api/Handle/run", {
    method: "POST",
    body: {
      data: JSON.stringify({
        data: params,
        run: "/Delivery/loopCheckQrImg",
        time: new Date().getTime()
      })
    }
  });
}

// 获取二维码
export async function getAuthQrcode(params) {
  return request("/Api/Handle/run", {
    method: "POST",
    body: {
      data: JSON.stringify({
        data: params,
        run: "/Delivery/auth",
        time: new Date().getTime()
      })
    }
  });
}

// 获取快递员
export async function getWxCourierList(params) {
  return request("/Api/Handle/run", {
    method: "POST",
    body: {
      data: JSON.stringify({
        data: params,
        run: "/Delivery/getWxCourierList",
        time: new Date().getTime()
      })
    }
  });
}

// 导入定制公众号快递员
export async function importCourier(params) {
  return request("/Api/Courier/importCourierInfo", {
    method: "POST",
    body: params
  });
}